#include <string>
#include <vector>
#include <iostream>

class BaseZoo
{
public:
    BaseZoo() = default;

    virtual void call(int num) const;

    virtual ~BaseZoo() = default;

protected:
    int count;
};

void BaseZoo::call(int num) const
{
    std::cout << "BaseZoo" << std::endl;
}

class Dog : public BaseZoo
{
public:
    Dog() = default;
    Dog(const std::string& animals);

    virtual void call(int num) const;

    virtual ~Dog();

protected:
    std::string animal;
};

Dog::Dog(const std::string& animals) : animal(animals) {}

void Dog::call(int num) const
{
    for(int i = 0; i < num; i++)
        std::cout << animal << " ";
    std::cout << std::endl;
}

Dog::~Dog() {}

void print_call(const BaseZoo& item, int num)
{
    item.call(num);
}

int main()
{
    Dog dog("dog");
    BaseZoo& base_name = dog;
    BaseZoo* base = &base_name;

    base->call(2);
    print_call(dog, 3);
    return 0;
}